<template>
	<view>
		<u-tabs-swiper active-color='#FF8710' ref="tabs" :list="list" :is-scroll="false" :current="current"
			@change="tabsChange" bar-width='170'></u-tabs-swiper>
		<view>
			<view v-for="(item,index) in dataList" class="item f-c-b" @click="$to(`../product_detail/product_detail?type=2`)">
				<view class="item-left">
					<image :src="item.url" mode="widthFix"></image>
				</view>
				<view class="item-right">
					<view class="title">
						{{item.title}}
					</view>
					<view class="price_browse f-c-b f30">
						<view class="browse f25 c6">
							<view>数量：{{item.browse}}</view>
							<view>买入日期：{{item.date}}</view>
						</view>
						<view class="price">
							<text class="f40">￥{{item.price.split('.')[0]}}.</text>
							<text>{{item.price.split('.')[1]}}</text>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
					name: '我买到的商品'
				}, {
					name: '我卖出的商品'
				}],
				current: 0,
				dataList: [{
					title: "甩开油田清爽一夏·【美国版】持 妆DW粉底液30ml 补水遮瑕持久...",
					price: '88.88',
					browse: 200,
					date:'2021.06.25 10:00',
					url: "../../static/index/img_sp.png"
				}, {
					title: "甩开油田清爽一夏·【美国版】持 妆DW粉底液30ml 补水遮瑕持久...",
					price: '88.88',
					browse: 200,
					url: "../../static/index/img_sp.png",
					date:'2021.06.25 10:00',
				}],
			}
		},
		methods: {
			tabsChange(i) {
				this.current = i
			}
		}
	}
</script>

<style>
	.item {
		background-color: #FFFFFF;
		margin-bottom: 20rpx;
		padding: 20rpx;
	}

	.item-left image {
		width: 160rpx;
	}

	.item-right {
		margin: 0 25rpx;
	}

	.price_browse {
		margin-top: 20rpx;
	}

	.price {
		color: #FF2929;
	}
</style>
